﻿using System;
using System.Data;
using System.Data.SqlClient;
using System.Web.UI.WebControls;
using System.Web.UI.HtmlControls;


public partial class Main_Inventory_Sales_Invoice_View : System.Web.UI.Page
{
    Datautility DU = new Datautility();
    protected void Page_Load(object sender, EventArgs e)
    {
        if (!IsPostBack)
        {
            bindcustomer();
        }
    }
    protected void bindcustomer()
    {
        DataTable DT = DU.getdatausingprocedure("USP_ACC_GetLedgerForPurchaseInvoice");
        if (DT.Rows.Count > 0)
        {
            ddlcustomer.DataSource = DT;
            ddlcustomer.DataTextField = "LNAME";
            ddlcustomer.DataValueField = "LID";
            ddlcustomer.DataBind();

            ListItem li = new ListItem("--- select Customer ---", "0");
            ddlcustomer.Items.Add(li);
            li.Selected = true;
           
        }
    }
    protected void Button1_Click(object sender, EventArgs e)
    {
        //Server.Execute("./inventoryprint/TestReport.aspx/");
        Response.Redirect("./inventoryprint/TestReport.aspx/");
    }
}